package com.xiguaji.tiktok.v1.tiktok.help.repository;

import com.xiguaji.tiktok.v1.tiktok.help.model.HelpMenu;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface HelpMenuRepository extends CrudRepository<HelpMenu,Long> {
    //获取菜单，按菜单层级和菜单序号排序
    @Query("SELECT * FROM help_menu " +
            " ORDER BY type,menu_sort DESC " )
    List<HelpMenu> findALLOrderByTypeAndOrderByMenuSortDesc();
}
